/** * This program provides the user a working menu with choices. * * @author Bijan Tajmir * @version 10/19/2014 */ import java.util.Scanner; public class WellnessMenu { public static void main(String [] args) { Scanner in = new Scanner(System.in); System.out.println("Please select one of the following options from the menu for more information."); System.out.println("\nSelect a letter corresponding to a menu option."); System.out.println("[A] BMI"); System.out.println("[B] BMR"); System.out.println("[C] Heathy Eating"); System.out.println("[D] Food Pyramid"); System.out.println("[E] Fitness Training"); System.out.print("Please enter the letter only that corresponds to your choice: "); String choice = in.next(); System.out.println(); if(choice.equalsIgnoreCase("A")) //condition for choice A goes in the parentheses { // provide print statement to indicate menu item A was chosen System.out.println("You chose A for BMI"); } else if(choice.equalsIgnoreCase("B")) //condition for choice B goes in the parentheses { // provide print statement to indicate menu item B was chosen System.out.println("You chose B for BMR"); } else if (choice.equalsIgnoreCase("C")) //condition for choice C goes in the parentheses { // provide print statement to indicate menu item C was chosen System.out.println("You chose C for Healthy Eating"); } else if (choice.equalsIgnoreCase("D")) //condition for choice D goes in the parentheses { // provide print statement to indicate menu item D was chosen System.out.println("You chose D for Food Pyramid"); } else if (choice.equalsIgnoreCase("E")) //condition for choice E goes in the parentheses { // provide print statement to indicate menu item E was chosen System.out.println("You chose E for Fitness Training"); } else //default choice for an invalid entry { // provide print statement to indicate invalid entry System.out.println("The choice you entered was invlaid, please try again."); } } }